[To resource_memory] add IOException throw to getDevices() method in TsFileResource#3703
[To resource_memory] add IOException throw to getDevices() method in TsFileResource#3703yyt86 wants to merge 35 commits intoapache:resource_memoryfrom
Conversation
|
hi , I have a little question. |
Which IOException throw do you mean, getDevices() method in FileTimeIndex or getAllDevices() method in TsFileSequenceReader? I don't change the getAllDevices() method in TsFileSequenceReader, and the IOException is thrown by readData method in line 565(ByteBuffer buffer = readData(metadataIndexNode.getChildren().get(i).getOffset(), endOffset);) and getAllDevices() method get the exception, and then continues to throw IOException. If the IOException refers to that thrown by getDevices() method in FileTimeIndex, that's because the IOExpetion is thrown from getAllDevices() method in TsFileSequenceReader class which is called by getDevices() in FileTimeIndex. After removing the devices field in FileTimeIndex class, we need to get deviceIds from getAllDevices() method in TsFileSequenceReader rather than devices field, so the IOException is thrown by getAllDevices() method in TsFileSequenceReader class, then by getDevices() in FileTimeIndex, then by getDevices() in TsFileReource. Does that make sense? |
Since we remove the devices field in FileTimeIndex class, the getDevices() method is changed to get all deviceIds from getAllDevices() method in TsFileSequenceReader class. So the IOException is thrown from getAllDevices() method in TsFileSequenceReader class to getDevices() in FileTimeIndex, then to getDevices() in TsFileReource.